import request from '@/utils/request'

// 查询客户群列表列表
export function listGroupchat(query) {
  return request({
    url: '/wework/groupchat/list',
    method: 'get',
    params: query
  })
}
// 查询客户群成员列表列表
export function listMember(id,queryMemberParams) {
  return request({
    url: '/wework/groupchat/listMember/'+id,
    method: 'get',
    params: queryMemberParams
  })
}

// 查询客户群列表详细
export function getGroupchat(id) {
  return request({
    url: '/wework/groupchat/' + id,
    method: 'get'
  })
}

// 同步所有客户群
export function syncAllGroupchat(data) {
  return request({
    url: '/wework/groupchat/syncAll',
    method: 'post',
    data: data
  })
}
// 同步指定客户群
export function syncGroupchat(wxChatId) {
  return request({
    url: '/wework/groupchat/sync/'+wxChatId,
    method: 'post',
  })
}

// 修改客户群列表
export function updateGroupchat(data) {
  return request({
    url: '/wework/groupchat',
    method: 'put',
    data: data
  })
}

// 删除客户群列表
export function delGroupchat(id) {
  return request({
    url: '/wework/groupchat/' + id,
    method: 'delete'
  })
}

// 导出客户群列表
export function exportGroupchat(query) {
  return request({
    url: '/wework/groupchat/export',
    method: 'get',
    params: query
  })
}
